package forcetower;

import static org.junit.Assert.*;

import org.junit.Test;

import util.ListaEncadeada;

public class MaoDeCartasTest {

	@Test
	public void BasicTest() {
		MaoDeCartas a = new MaoDeCartas();
		Carta c = new Carta(0,0,0);
		
		assertEquals (0, a.mostrarPontos());
		
		a.pegarCarta(c);
		
		assertEquals (11, a.mostrarPontos());
		
		c = new Carta(0, 12, 0);
		a.pegarCarta(c);
		
		assertEquals (21, a.mostrarPontos());
		
		c = new Carta(0, 1, 0);
		a.pegarCarta(c);
		
		assertEquals (13, a.mostrarPontos());
		
		ListaEncadeada b = a.mostrarCartas();
		
		assertEquals (3, b.tamanho());
		
		c = new Carta(0, 2, 0);
		a.pegarCarta(c);
		
		assertEquals (16, a.mostrarPontos());
		assertEquals (4, b.tamanho());
		
		c = new Carta(0, 12, 0);
		a.pegarCarta(c);
		
		assertEquals (26, a.mostrarPontos());
		assertEquals (5, b.tamanho());
		
		c = new Carta(1,0,0);
		a.pegarCarta(c);
		
		assertEquals (27, a.mostrarPontos());
		assertEquals (6, b.tamanho());
	}

}
